﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Core;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections;
using System.ComponentModel;

namespace Data.DataGet
{
   public class _HoaDonBan
    {
       DataProvider ob = new SQLProvider();
       public int Insert_HoaDonBan(string MaHDB, string TenKH, string DiaChi, string MaNV, float ThueXuat, float TongTien, float KhuyenMai, DateTime NgayBan)
       {
           string SPName = "insert_HoaDonBan";
           SqlParameter[] para = new SqlParameter[8];
           para[0] = new SqlParameter("@MaHDB", MaHDB);
           para[1] = new SqlParameter("@TenKH", TenKH);
           para[2] = new SqlParameter("@DiaChi", DiaChi);
           para[3] = new SqlParameter("@MaNV", MaNV);
           para[4] = new SqlParameter("@ThueXuat", ThueXuat);
           para[5] = new SqlParameter("@TongTien", TongTien);
           para[6] = new SqlParameter("@KhuyenMai", KhuyenMai);
           para[7] = new SqlParameter("@NgayBan", NgayBan);
           if (ob.Execute_Modify(SPName, para) >= 1)
               return 1;
           else
               return 0;
       }
    }
}
